package com.ling.luo.trade.service.impl;

import com.ling.luo.trade.entity.User;
import com.ling.luo.trade.mapper.UserMapper;
import com.ling.luo.trade.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author luohoujian
 * @since 2021-05-09
 */
@Service("userService")
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {


	/**
	 * 分页查询
	 *
	 * @param page
	 * @param query
	 * @return
	 */
	@Override
	public IPage<User> selectPage(Page<User> page, User query) {
		if (page == null) {
			page = new Page<>();
		}
		return getBaseMapper().pageList(page, query);
	}
}
